//
//  CustomNavigation.m
//  supplyerIOS
//
//  Created by UaenaMo on 2018/5/31.
//  Copyright © 2018年 UaenaMo. All rights reserved.
//

#import "CustomNavigation.h"

@implementation CustomNavigation

+(instancetype)navigation
{
    
    CGFloat height = 64;
    if (KISIphoneX) {
        height = 108;
    }
    
    CustomNavigation * nav = [[CustomNavigation alloc]initWithFrame:CGRectMake(0, 0, ScreenWidth, height)];
    return nav;
}

-(instancetype)initWithFrame:(CGRect)frame
{
    if (self = [super initWithFrame:frame])
    {
        
    }
    return self;
}

-(void)addView:(UIView *)view
{
    CGFloat iphonex = 0;
    if (KISIphoneX) {
        iphonex = 44;
    }
    [self addSubview:view];
    view.frame = CGRectMake(view.frame.origin.x, view.frame.origin.y + iphonex, view.frame.size.width, view.frame.size.height);
}


/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
